<?php if ($shopping_cart->isEmpty()): ?>

<div class="emptycart" >Your shopping cart is empty.</div>

<?php else: ?>
<div class="cart_contain">
    <form action="<?php echo _link('+/customarOrder/update')->getHref()?>" name="" method="post">
        <table  width="100%" class="cart-table data-table">
            <thead>
                <tr class="first last">
                    <th >&nbsp;</th>
                    <th ><span class="nobr">Product Name</span></th>
                    <th><span class="nobr">Color</span></th>
                    <th><span class="nobr">Size</span></th>
                    <th class="a-center"><span class="nobr">Unit Price</span></th>
                    <th class="a-center">Qty</th>
                    <th class="a-center">Subtotal</th>
                    <th class="a-center">&nbsp;</th>
                </tr>
            </thead>
            <tfoot>
                <tr class="first last">
                    <td class="a-right last" colspan="8">
                        <button onClick="window.location = '<?php echo $sf_user->getAttribute('shopping_redirect_url')?>';return false;" class="button btn-continue" title="Continue Shopping" type="button"><span><span>Continue Shopping</span></span></button>
                        <button class="button btn-update" title="Update Shopping Cart" type="submit"><span><span>Update </span></span></button>
                    </td>
                </tr>
                <tr class="first last">
                    <td ></td>
                    <td class="a-right last" colspan="8" align="right">
                        <button style="float: right" onClick="window.location = '<?php echo _link('customarOrder/placeCustomerOrder')->getHref();?>';return false;" class="button btn-continue" title="Continue Shopping" type="button"><span><span>Order</span></span></button>
                        
                    </td>
                </tr>
            </tfoot>
            <tbody>
                <?php foreach ($items as $key => $item): ?>
                <?php
                    $object = ProductTable::getInstance()->find($item->getId());?>
                <tr class="first last <?php echo ($key%2)?'even':'odd'?>">
                    <td width="60">
                        <a class="product-image" title="Product Title" href="#">
                            <?php echo _media($object->Image)->method('fit')->size(55,55)?>
                        </a>
                    </td>
                    <td width="218px">
                        <h2 class="product-name"><?php echo _link($object)?></h2>
                    </td>
                    <td class="a-right">
                        <span class="cart-price">
                            <input  type="hidden" maxlength="12" class="input-text qty" title="Color" size="4" value="<?php echo $item->getColor()?>" name="color[<?php echo $item->getId()?>]">
                            <span class="price"><?php echo $item->getColor()?></span>
                        </span>
                    </td>
                    <td class="a-right">
                        <span class="cart-price">
                            <input maxlength="12" type="hidden" class="input-text qty" title="Size" size="4" value="<?php echo $item->getSize()?>" name="size[<?php echo $item->getId()?>]">
                            <span class="price"><?php echo $item->getSize()?></span>
                        </span>
                    </td>
                    <td class="a-right">
                        <span class="cart-price">
                            <span class="price">BDT: <?php echo $item->getPrice()?></span>
                        </span>
                    </td>
                    <td class="a-center">
                        <input maxlength="12" class="input-text qty" title="Qty" size="4" value="<?php echo $item->getQuantity()?>" name="qty[<?php echo $item->getId()?>]">
                    </td>
                    <td class="a-right">
                        <span class="cart-price"><span class="price">BDT: <?php echo ($item->getPrice()*$item->getQuantity())?></span></span>
                    </td>
                    <td class="a-center last"><?php echo _link('+/customarOrder/delete')->set('.btn-remove.btn-remove2')->params(array('id' => $item->getId(), 'size' => $item->getSize(), 'color' => $item->getColor()))->text('Remove item')?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </form>
</div>
<?php endif; ?>